For cleaning RAM contacts, use a soft cloth lightly dampened with isopropyl alcohol. Gently wipe the gold or copper contacts to remove any dirt or corrosion.
Erasing RAM memory does not fix bad RAM modules. I think what you are referring to is the act of removing the RAM from the system, then using an eraser.
Learn how to troubleshoot faulty RAM on your PC with this step-by-step tutorial. Discover expert hacks and tips to optimize your computer's performance.